package net.tv90.bfmccore.game.impl;

import net.tv90.bfmccore.game.GameUtils;
import net.tv90.bfmccore.util.vector.Vector3i;
import org.bukkit.entity.Player;

import static net.tv90.bfmccore.helper.FactionHelper.getCountry2;

public class SDMGame extends TDMGame {

    @Override
    public void teleportSinglePlayerToBattleField(Player p) {
        if (getCountry2(p).equals(firstFactionName)) {
            Vector3i vec = GameUtils.getExactSpawnPoint(p, firstFactionSpawnPointList, EnumSpawnPolicy.FURTHEST_TO_ENEMY, 8);
            teleportSinglePlayer2(p, vec);
        } else if (getCountry2(p).equals(secondFactionName)) {
            Vector3i vec = GameUtils.getExactSpawnPoint(p, secondFactionSpawnPointList, EnumSpawnPolicy.FURTHEST_TO_ENEMY, 8);
            teleportSinglePlayer2(p, vec);
        } else teleportSinglePlayer2(p, mainSpawnPoint);
    }

}
